package www.reagnetbox.com.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class JSONUtils {

    public static Object getValue(String response, String filedName) {
        if (response == null) {
            return null;
        }
        JSONObject jo = JSON.parseObject(response);
        return jo.get(filedName);
    }

    public static Object getObject(String response, String filedName) {
        if (response == null) {
            return null;
        }
        JSONObject jo = JSON.parseObject(response);
        return jo.get(filedName);
    }
}
